<template>
  <a-modal
    :title="title"
    :width="800"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :ok-button-props="{ props: { disabled: disableSubmit } }"
    :destroyOnClose='true'
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="false"
        :customRow="handleClickRow"
        :expanded-row-keys.sync="expandedRowKeys"
        style='height: 500px;overflow-x: hidden; overflow-y: auto;'
      >
      </a-table>
    </a-spin>
  </a-modal>
</template>

<script>
import { postAction, getAction } from '@/api/manage'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import columns from './modalColumns'
export default {
  name: "ProjectModel",
  mixins: [JeecgListMixin],
  components: {
  },
  data () {
    return {
      title:"辅助",
      visible: false,
      disableSubmit: false,
      isCheck: false,
      confirmLoading: false,
      columns: columns(this),
      url: {
        list: '',
      },
      expandedRowKeys: [],
      disableMixinCreated: true
    }
  },
  created () {
  },
  watch: {

  },
  methods: {
    edit (record) {
      this.url.list = record.interfaceName
      this.loadData(1)
      this.visible = true;
    },
    handleClickRow(record, index){
      return {
        on: {
          dblclick: () => {
            this.$emit('onSelect', record)
            this.visible = false;
            // console.log(8,this.checkedRows)
            // console.log(9,record.id)
            // console.log(record, index)
            // console.log('点击行内容record' + record)
            // console.log('序号索引index' + index)
          }
        }
      }
    },
    close () {
      this.$emit('close');
      this.visible = false;
    },
    handleOk () {
      this.$emit('ok', this.model);
      this.visible = false;
    },
    handleCancel () {
      this.close()
    },
    expandIcon(props){
      console.log(99994444,props)
    }
  }
}
</script>

<style scoped>

</style>
<style lang="less" scoped>
.table-bordered /deep/ .ant-col-sm-16{
  width:100%;
}
.right{
  .main{
    padding:10px;
    background-color: #F1F5FF;
  }
}
.box{
  padding:20px
}

</style>